/**** 页头 ****/
@import '../../assets/styles/global-variable.less';

.Header {
    width: 100%;
    height: @header-height;
    background-color: #fff;
    border-bottom: @theme-box-border;
    display: flex;
    justify-content: space-between;
    user-select: none;
    // 导航和顶部导航
    .logo-nav {
        display: flex;
        .logo {
            width: @left-nav-width;
            height: @header-height;
            background: #fff url("../../assets/images/logo.png") no-repeat center
                center;
            border-bottom: @theme-box-border;
        }
        // 顶部导航
        .top-nav {
            ul {
                height: 100%;
                margin: 0;
                padding: 0;
                list-style: none;
                display: flex;
                li {
                    height: 100%;
                    a {
                        width: 100%;
                        height: 100%;
                        padding: 0 32px;
                        font-size: 1.15rem;
                        line-height: @header-height - 4px;
                        display: block;
                        transition: 0.15s;
                        &:hover {
                            color: lighten(@theme-color, 12%);
                            transform: scale(1.06);
                        }
                        &.active {
                            background-image: radial-gradient(
                                130px 60px ellipse at bottom center,
                                lighten(@theme-color, 20%),
                                @theme-color
                            );
                            color: #fff;
                            &:hover {
                                transform: scale(1);
                            }
                        }
                    }
                }
            }
        }
    }

    // 用户信息和退出登录
    .user-profile {
        padding-right: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        div {
            display: flex;
            align-items: center;
            // 用户信息
            &.user-info {
                height: 100%;
                a {
                    height: 100%;
                    display: flex;
                    flex-wrap: nowrap;
                    align-items: center;
                    color: #6d6d6d;
                    .user-avatar {
                        width: 32px;
                        height: 32px;
                        margin-right: 6px;
                        img {
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                        }
                    }
                    span {
                        white-space: nowrap;
                        color: @theme-color;
                        &:hover {
                            text-decoration: underline;
                        }
                    }
                }
            }

            // 退出登录
            &.login-out {
                padding: 10px 0 10px 12px;
                color: @danger-color;
                cursor: pointer;
                &:hover {
                    color: lighten(@danger-color, 10%);
                }
                &:active {
                    color: @danger-color;
                }
            }
        }
    }
}